'use strict'

function Dimension(){
	this.values = {};
}

Dimension.prototype.add = function(row,reader){
	var entity = reader(row);
	if( entity && entity.key!==undefined && entity.value !==undefined ){
		this.values[entity.key] = entity.value;
	}
}

Dimension.prototype.show = function(){
	var log = [],
		key;
	console.log('====================================');
	console.log('==dimensions size: '+ Object.keys(this.values).length ); 
	for( key in this.values ){
		log.push( key +'>'+this.values[key]);
	}
	console.log(' data: '+ log.join(','));
}

module.exports = {
	Dimension: Dimension
};
